package org.roulette.generator;

import java.util.Random;

/**
 *
 * @author amra
 */
public class DefaultNumberGenerator implements NumberGenerator{

	Random rand = new Random();
	private int rangeStart;
	private int rangeEnd;

	public int generateNumber() {
		//rangeEnd inxlusive => +1
		int number = rand.nextInt(rangeEnd + 1 - rangeStart);
		return number + rangeStart;
	}

	public void setRange(int rangeStart, int rangeEnd) {
		this.rangeStart = rangeStart;
		this.rangeEnd = rangeEnd;
	}

	public boolean isNextNumber() {
		return true;
	}
}
